﻿using System.ComponentModel.DataAnnotations;
using User.Global.Constvalues;
using User.Global.Resources;
using User.Web.Common.WebAttributes;
using User.Web.Contracts.Model.Account;

namespace User.Web.Models.Account
{
    public class LoginModel : ModelBase, ILoginModel
    {
        #region Member
        [Required]
        [EmailAddress]
        [DataType(DataType.EmailAddress)]
        [Display(ResourceType = typeof(InputFieldNames), Name = "Username")]
        [HtmlAttributes(CssClass = "form-control", Required = true, Placeholder = "Email (Username)")]
        public string Username { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [StringLength(100, ErrorMessageResourceType = typeof(ErrorMessages), ErrorMessageResourceName = "MinPasswordLength", MinimumLength = ConstLengthValues.MinPasswordLength)]
        [Display(ResourceType = typeof(InputFieldNames), Name = "Password")]
        [HtmlAttributes(CssClass = "form-control", Placeholder = "Passwort", Required = true)]
        public string Password { get; set; }
        #endregion

        #region Public Functions
        #endregion
    }
}
